macro(MAC_CUDA_CONFIG)
# NOTE:
# 需要根据实际CUDA的安装路径修改下面的相应变量。
# 例如, 本人windows端的安装路径为
#    C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6

    # 定义 cuda 路径
    if(MSVC)
        # cuda 本地安装路径
        set(CUDA_PREFIX "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6")
        # 包含路径
        set(CUDA_INC_PATH "${CUDA_PREFIX}\\include")
        # 库路径
        set(CUDA_LIB_PATH "${CUDA_PREFIX}\\lib\\x64")
        # 链接库名
        set(CUDA_LIB "cuda;cudart;cufft")
        # 编译选项
        set(CUDA_COMP_OPT "/D_DISABLE_EXTENDED_ALIGNED_STORAGE")
        # 待编译源文件
        set(CUDA_SRC_FILES "")
    else()
        set(CUDA_PREFIX "/usr/local/cuda")
        # 包含路径
        set(CUDA_INC_PATH "${CUDA_PREFIX}/include")
        # 库路径
        set(CUDA_LIB_PATH "${CUDA_PREFIX}/lib64")
        # 链接库名
        set(CUDA_LIB "cuda;cudart;cufft")
        # 编译选项
        set(CUDA_COMP_OPT "")
        # 待编译源文件
        set(CUDA_SRC_FILES "")
    endif()

    # 添加自定义CUDA包含路径    
    LIST(APPEND CUDA_INC_PATH "${CMAKE_SOURCE_DIR}/cudalib/public")

    # 添加自定义CUDA源文件
    LIST(APPEND CUDA_SRC_FILES "${CMAKE_SOURCE_DIR}/cudalib/public/hs_cuda_utils.cu")

    # 设置计算架构
    # set(CUDA_ARCHITECTURES "60 75 89")
    set(CUDA_ARCHITECTURES "native")

    # 定义此变量用于判断是否调用宏函数
    set(MAC_ENABLE_COMPILE_CUDA "ON")

endmacro()
